package com.waimai.mobile.api;

/**
 * Created by lin on 2015/6/17.
 */
public class APIConst {

//    public static final String IP = "192.168.1.109";
    public static final String IP = "10.2.139.32";
    public static final String PORT = "8080";
    public static final String SERVER_NAME = "WaiMai-Server";

    public static final String ROOT_URL = "http://" + IP + ":" + PORT + "/" +SERVER_NAME;

    public static final String LOGIN = "/login";
    public static final String REGIST = "/regist";
    public static final String UPDATE_USER = "/user/{userId}";

    public static final String ADDRESSES = "/user/{userId}/addresses";
    public static final String ADD_ADDRESS = "/user/{userId}/address";
    public static final String UPDATE_ADDRESS = "/user/{userId}/address/{addressId}";
    public static final String DELETE_ADDRESS = "/user/{userId}/address/{addressId}";

    public static final String RESTAURANTS = "/restaurants";
    public static final String RESTAURANT_GET = "/restaurant/{restaurantId}";

    public static final String RESTAURANT_CHECK = "/restaurant/{restaurantId}/check";

    public static final String FOODS = "/restaurant/{restaurantId}/foods";

    public static final String ORDERS = "/user/{userId}/orders";
    public static final String ORDER_GET = "/user/{userId}/order/{orderId}";
    public static final String ADD_ORDER = "/restaurant/{restaurantId}/order";
    public static final String UPDATE_ORDER = "/restaurant/{restaurantId}/order/{orderId}";

    public static final String COMMENTS = "/restaurant/{restaurantId}/comments";
    public static final String ADD_COMMENT = "/user/{userId}/order/{orderId}/comment";

    public static String getAPI(String api){
        return ROOT_URL + api;
    }
}
